﻿@using DragonSpark.Server
@using DragonSpark.Server.ClientHosting
@model DragonSpark.ApplicationDetails

<!DOCTYPE html>
<html style="height: 100%">
    <head>
        <title>@Model.Title</title>
        
        <meta charset="utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <meta name="apple-mobile-web-app-status-bar-style" content="black" />
        <meta name="format-detection" content="telephone=no"/>
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        
        <link rel="apple-touch-startup-image" href="~/Content/images/ios-startup-image-landscape.png" media="(orientation:landscape)" />
        <link rel="apple-touch-startup-image" href="~/Content/images/ios-startup-image-portrait.png" media="(orientation:portrait)" />
        <link rel="apple-touch-icon" href="~/Content/images/icon.png" />

	    @Styles.Render("~/Content/css")
        
	    <style>
    		.durandal-wrapper {
    			height: 100%;
    		}
    		 h1 {
	    		 margin: 0;
	    		 padding: 0;
    		 }
    	</style>
		
	    <script type="text/javascript">
    		if (navigator.userAgent.match(/IEMobile\/10\.0/)) 
    		{
    			var msViewportStyle = document.createElement("style");
    			var mq = "@@-ms-viewport{width:auto!important}";
    			msViewportStyle.appendChild(document.createTextNode(mq));
    			document.getElementsByTagName("head")[0].appendChild(msViewportStyle);
    		}
    	</script>
	</head>
	<body style="height: 100%; overflow-x: hidden">
		<div id="applicationHost">
			<div class="splash">
				<div class="message">Loading...</div>
				<i class="icon-spinner icon-2x icon-spin active"></i>
			</div>
		</div>


		@{
			var package = !ServerContext.Current.IsDebuggingEnabled || BundleTable.EnableOptimizations;
		}
		@Scripts.Render( package ? VirtualPathProvider.Application : VirtualPathProvider.Directory )

		@if ( !package )
		{
			<script src="~/signalr/hubs"></script>
			<script type="text/javascript" src="~/Client/DragonSpark.Client/Core/require.js" data-main="Client/initializer.development"></script>
		}
	</body>
</html>